package tournamentmanager;

public abstract class AbstractMatchRunner implements MatchRunner {    
    
    ChessEngine whitePlayer;

    ChessEngine blackPlayer;
    
    int timeControl;

    int movesPerSession;

    int timeIncrement;
    
    String saveGameFile = "";

    public void rotatePlayers() {
        ChessEngine tmpWhitePlayer = whitePlayer;
        setWhitePlayer(blackPlayer);
        setBlackPlayer(tmpWhitePlayer);
    }

    public void setWhitePlayer(ChessEngine whitePlayer) {
        this.whitePlayer = whitePlayer;
    }

    public ChessEngine getWhitePlayer() {
        return whitePlayer;
    }

    public void setBlackPlayer(ChessEngine blackPlayer) {
        this.blackPlayer = blackPlayer;
    }

    public ChessEngine getBlackPlayer() {
        return blackPlayer;
    }

    public void setTimeControl(int timeControl) {
        this.timeControl = timeControl;
    }

    public int getTimeControl() {
        return timeControl;
    }

    public void setSaveGameFile(String saveGameFile) {
        this.saveGameFile = saveGameFile;
    }

    public String getSaveGameFile() {
        return saveGameFile;
    }

    public void setMovesPerSession(int movesPerSession) {
        this.movesPerSession = movesPerSession;
    }

    public int getMovesPerSession() {
        return movesPerSession;
    }
    
    public int getTimeIncrement() {
        return timeIncrement;
    }

    public void setTimeIncrement(int timeIncrement) {
        this.timeIncrement = timeIncrement;
    }

    public abstract void run();
    
}
